This invention relates to methods and apparatus for caching data, and more particularly to a method and apparatus for preloading data into cache.
A typical computer system includes at least a processing unit, a display device, a primary storage device (e.g., random access memory--RAM), a secondary storage device (e.g., a disk storage device), a keyboard, and a pointing/clicking device. Once a computer program is installed on the computer the program resides on the secondary storage device. The secondary storage device serves as a large permanent memory space. Exemplary secondary storage devices include a hard disk drive, a floppy disk drive, and a compact disk drive. There are many different types of disks, including magnetic disks, magneto-optical disks, optical disks, and floppy disks. The primary storage device commonly serves as a cache for improving access time to data stored on the secondary storage device media. For example, when launching a program that is stored on the secondary storage device media, portions of the program are accessed and moved to the primary storage device. Conventionally, the primary storage device has a smaller address space and is accessed faster than the secondary storage device.
A conventional method for preloading cache memory is called look ahead caching. Under such method when a block of data is moved into cache in response to a data request, the cache also moves one or more adjacent blocks of data It is assumed that in many cases a subsequent data request will come for an adjacent block, so such block is preloaded. This invention is directed to another method of preloading cache.